<?php
namespace Pw\MainBundle\Form\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class ChapterType extends AbstractType
{
	
	public function buildForm(FormBuilderInterface $builder, array $options) {
		$builder->add('title', 'text', array('attr' => array('class' => 'chapterTitle')));
		$builder->add('rawText', 'textarea', array('label' => '', 'attr' => array('toolbar' => '')));
	}
    public function getName() {
        return 'chapter';
    }
    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Pw\MainBundle\Entity\Chapter',
            'intention'       => 'chapter_item',
        ));
    }
}
